# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/gnome <ablocorrea@hotmail.com>
pkgname=calls
pkgver=45.0
pkgrel=0
pkgdesc="Phone dialer and call handler"
arch="all"
url="https://gitlab.gnome.org/GNOME/calls"
license="GPL-3.0-or-later"
depends="
	callaudiod
	modemmanager
	"
makedepends="
	callaudiod-dev
	evolution-data-server-dev
	desktop-file-utils
	feedbackd-dev
	folks-dev
	gettext-dev
	gobject-introspection-dev
	gom-dev
	gsound-dev
	gstreamer-dev
	gtk+3.0-dev
	libhandy1-dev
	libpeas-dev
	meson
	modemmanager-dev
	ninja
	py3-docutils
	sofia-sip-dev
	vala
	"
subpackages="$pkgname-doc $pkgname-lang"
source="https://download.gnome.org/sources/calls/${pkgver%%.*}/calls-$pkgver.tar.xz"
options="!check" # Requires running Wayland compositor

build() {
	abuild-meson \
		-Db_lto=true \
		-Dtests="$(want_check && echo true || echo false)" \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
43f9892604b9a9b783e302dce1650a7d9cffc1e36edb512ea468c1e11f1d62ce5d450d1121dc815fe04a6b2d69e5970288b790ffd891571ac08ff59519577118  calls-45.0.tar.xz
"
